//
//  WBShowProgressViewController.m
//  WeiBo
//
//  Created by bao on 2017/10/9.
//  Copyright © 2017年 powertorque. All rights reserved.
//

#import "WBShowProgressViewController.h"

@interface WBShowProgressViewController ()

@property (nonatomic, strong) UIProgressView *progressView;

@end

@implementation WBShowProgressViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)showProgressView
{
    [self.view addSubview:self.progressView];
    [self.progressView bringSubviewToFront:self.view];
}

- (void)hideProgressView
{
    self.progressView.progress = 0.0;
    [self.progressView removeFromSuperview];
}

#pragma mark - Getter

- (UIProgressView *)progressView
{
    if (!_progressView) {
        _progressView = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleDefault];
        _progressView.progress = 0.0;
        _progressView.frame = CGRectMake(0, kNavBarAddStatusBarHeight + 1, kScreenWidth, 0);
    }
    return _progressView;
}
@end
